package bio.filedemo1;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author charwayH
 * 目标: 服务端开发，可以实现接收客户端任意类型文件，并保存到服务端磁盘
 */
public class Server {
    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(9995);
            while (true){
                Socket sockect = serverSocket.accept();
                 new ServerReaderThread(sockect).start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}